package com.ms.zuul.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class ZuulConfig {

	@Bean(name="zuul.CONFIGURATION_PROPERTIES")
	@RefreshScope
	@ConfigurationProperties("zuul")
    @Primary
    public ZuulProperties zuulProperties() {
		ZuulProperties zuulProperties = new ZuulProperties();
        return zuulProperties;
    }
}